package com.vsd.mobile.error;

import com.demo.mobile.IMError;


public enum MEnumError implements IMError {
	SYSERROR(100001,"系统错误"),
	PHONE_EXIST_ERROR(110001,"手机号已存在"),
	PHONE_NOTEXISTS_ERROR(110002,"手机号不存在"),
	MOBILE_CODE_ERROR(110003,"验证码不正确"),
	CREATE_ACCOUNT_ERROR(110004,"用户创建失败"),
	LOGIN_FAILURE_ERROR(110005,"用户名密码不正确"),
	ACCOUNT_STOP_ERROR(110006,"用户账户已被禁用"),
	PASSWORD_FALSE_ERROR(110007,"密码不正确"),
	USER_NOT_EXISTS(110008,"用户不存在"),
	
	CREDIT_GOODS_NOT_FOUND(120001,"积分商品不存在"),
	CREDIT_NOT_ENOUGH(120002,"积分不足"),
	CREDIT_GOODS_NOT_ENOUGH(120003,"积分商品库存不足"),
	
	COUPON_NOT_ENOUGH(130001,"优惠券库存不足"),
	COUPON_OUT_OF_DATE(130002,"优惠券已过期"),
	COUPON_ONLY_ONE(130003,"该优惠券只能领取一次"),
	COUPON_ONLY_ONE_DAY(130004,"该优惠券每天限领一次"),
	
	STORE_NOT_FOUND(140001,"商家未找到"),
	
	GOODS_NOT_FOUND(150001,"商品未找到"),
	ONLY_TG_ALLOW(150002,"只能提交团购商品"),
	ONLY_DISH_ALLOW(150003,"只能提交菜品和酒水"),
	
	ORDER_CAN_NOT_COMMENT(160001,"订单状态不正确"),
	ORDER_GOODS_NOT_EXIST(160002,"订单菜品不存在"),
	COUPON_NOT_EXIST(160003,"优惠券不存在"),
	COUPON_CAN_NOT_USE(160004,"优惠券未到使用日期"),
	ORDER_STATE_NOT_OK(160005,"订单不存在或已过期"),
	COUPON_NOT_FOUND(160006,"未找到优惠券"),
	ORDER_NOT_FOUND(160007,"订单未找到"),
	ORDER_IS_USELESS(160008,"订单已过期"),
	ORDER_CREATE_ERROR(160009,"订单创建失败"),
	ORDER_HASPAY_ERROR(160010,"订单已支付"),
	ORDER_DELETE_ERROR(160011,"订单无法删除"),
	PARAM_WRONG_ERROR(160012,"未知操作"),
	QUICK_GOODS_NOT_ENOUGH(160013,"抢购商品数量不足"),
	TG_ORDER_ONLY_ONLINE(160014,"团购商品只能线上支付"),
	
	HAS_COLLECT(170012,"已收藏"),
	
	;
	
	/** 错误编码 */
	private int errorCode;

	/** 错误信息 */
	private String errorMsg;
	
	/**
	 * 构造函数
	 */
	private MEnumError(int errorCode, String errorMsg) {
		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}

	/**
	 * @return int 错误代码
	 */
	public int getErrorCode() {
		return errorCode;
	}

	/**
	 * @return String 错误信息
	 */
	public String getErrorMsg() {
		return errorMsg;
	}
}
